"; echo ""; ?> "; echo "Error!!!"; echo ""; echo ""; echo ""; echo "
"; echo "You are not logged in
"; echo "Or Your session has been expired

"; echo "Login"; echo "
"; echo ""; echo ""; exit(); } if(isbanned($uid)) { echo ""; echo "Error!!!"; echo ""; echo ""; echo ""; echo "

"; echo "\"x\"/
"; echo "You are Banned

"; $banto = mysql_fetch_array(mysql_query("SELECT timeto, pnreas, exid FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1' OR uid='".$uid."' AND penalty='2'")); $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'")); $remain = $banto[0]- time(); $rmsg = gettimemsg($remain); echo "Time Left: $rmsg
"; $nick = getnick_uid($banto[2]); echo "By: $nick
"; echo "Reason: $banto[1]"; //echo "Login"; echo "

"; echo ""; echo ""; exit(); } $isroom = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_rooms WHERE id='".$rid."'")); if($isroom[0]==0) { echo ""; echo "Error!!!"; echo ""; echo ""; echo ""; echo "
"; echo "Room Doesn't Exist

"; echo "Chatrooms"; echo "
"; echo ""; echo ""; exit(); } $passworded = mysql_fetch_array(mysql_query("SELECT pass FROM ibwf_rooms WHERE id='".$rid."'")); if($passworded[0]!="") { if($rpw!=$passworded[0]) { echo ""; echo "Error!!!"; echo ""; echo ""; echo ""; echo "
"; echo "Wrong Password!
"; echo "You can't enter this room

"; echo "Chatrooms"; echo "
"; echo ""; echo ""; exit(); } } if(!canenter($rid,$sid)) { echo ""; echo "Error!!!"; echo ""; echo ""; echo ""; echo "
"; echo "Permission denied!

"; echo "Chatrooms"; echo "
"; echo ""; echo ""; exit(); } addtochat($uid, $rid); $timeto = 300; $timenw = time(); $timeout = $timenw-$timeto; $deleted = mysql_query("DELETE FROM ibwf_chat WHERE timesent<".$timeout.""); $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'")); $rname = $rooms[1]; $nick = getnick_sid($sid); if ($action=="") { echo ""; echo "$nick@$rname"; echo ""; $unreadpopup=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_popups WHERE unread='1' AND touid='".$uid."'")); if ($unreadpopup[0]<1) { echo ""; } echo ""; echo ""; addonline($uid,"Chating in $rname","chat.php?rid=$rid&rpw=$rpw"); //echo "

"; echo popup($sid); echo "Write||"; echo "Refresh
"; $unreadinbox=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE unread='1' AND touid='".$uid."'")); $unrd="".$unreadinbox[0].""; if ($unreadinbox[0]>0) { echo "5 $unrd New Inbox!
"; } //echo "

"; //echo "

"; $message=$_POST["message"]; $who = $_POST["who"]; $rinfo = mysql_fetch_array(mysql_query("SELECT censord, freaky FROM ibwf_rooms WHERE id='".$rid."'")); if (trim($message) != "") { if(!isblocked($message,$uid)) { $chatok = mysql_query("INSERT INTO ibwf_chat SET chatter='".$uid."', who='".$who."', timesent='".time()."', msgtext='".$message."', rid='".$rid."';"); $lstmsg = mysql_query("UPDATE ibwf_rooms SET lastmsg='".time()."' WHERE id='".$rid."'"); $hehe=mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'")); $totl = $hehe[0]+1; $msgst= mysql_query("UPDATE ibwf_users SET chmsgs='".$totl."' WHERE id='".$uid."'"); }else{ $bantime = time() + (30*24*60*60); echo "\"X\"/"; echo "Can't Post Msg

"; echo "You just tried sending a msg with a link to one of the crapiest sites on earth
The members of these sites spam here a lot, so go to that site and stay there if you don't like it here
as a result of your stupid action:
1. you have lost your sheild
2. you have lost all your plusses
3. You are BANNED!"; $user = getnick_sid($sid); mysql_query("INSERT INTO ibwf_mlog SET action='autoban', details='".getnick_uid(1)." auto banned $user for spamming chat', actdt='".time()."'"); mysql_query("INSERT INTO ibwf_penalties SET uid='".$uid."', penalty='1', exid='1', timeto='".$bantime."', pnreas='Banned: Automatic Ban for spamming for a crap site'"); mysql_query("UPDATE ibwf_users SET plusses='0', shield='0' WHERE id='".$uid."'"); echo ""; echo ""; exit(); } if($rinfo[1]==2) { //oh damn i gotta post this message to ravebabe :( //will it succeed? $botid = "eeb070e74e366473"; $hostname = "www.pandorabots.com"; $hostpath = "/pandora/talk-xml"; $sendData = "botid=".$botid."&input=".urlencode($message)."&custid=".$custid; $result = PostToHost($hostname, $hostpath, $sendData); $pos = strpos($result, "custid=\""); $pos = strpos($result, ""); if ($pos === false) { $reply = ""; } else { $pos += 6; $endpos = strpos($result, "", $pos); $reply = unhtmlspecialchars2(substr($result, $pos, $endpos - $pos)); $reply = mysql_escape_string($reply); } $chatok = mysql_query("INSERT INTO ibwf_chat SET chatter='1', who='', timesent='".time()."', msgtext='".$reply." @".getnick_uid($uid)."', rid='".$rid."';"); } $message = ""; } echo "
"; $chats = mysql_query("SELECT chatter, who, timesent, msgtext, exposed FROM ibwf_chat WHERE rid='".$rid."' ORDER BY timesent DESC, id DESC"); $counter=0; while($chat = mysql_fetch_array($chats)) { $canc = true; if($counter<40) { if(istrashed($chat[0])){ if($uid!=$chat[0]) { $canc = false; } } //////good /*if(isignored($chat[0],$uid)){ $canc = false; }*/ //////////good if($chat[0]!=$uid) { if($chat[1]!=0) { if($chat[1]!=$uid) { $canc = false; } } } if($chat[4]=='1' && ismod($uid)) { $canc = true; } if($canc) { $cmid = mysql_fetch_array(mysql_query("SELECT chmood FROM ibwf_users WHERE id='".$chat[0]."'")); $iml = ""; if(($cmid[0]!=0)) { $mlnk = mysql_fetch_array(mysql_query("SELECT img, text FROM ibwf_moods WHERE id='".$cmid[0]."'")); $iml = "\"$mlnk[1]\"/"; } $chnick = getnick_uid($chat[0]); $optlink = $iml.$chnick; if(($chat[1]!=0)&&($chat[0]==$uid)) { ///out $iml = "\"!\"/"; $chnick = getnick_uid($chat[1]); $optlink = $iml."Pm To ".$chnick; } if($chat[1]==$uid) { ///out $iml = "\"!\"/"; $chnick = getnick_uid($chat[0]); $optlink = $iml."Pm By ".$chnick; } if($chat[4]=='1') { ///out $iml = "\"!\"/"; $chnick = getnick_uid($chat[0]); $tonick = getnick_uid($chat[1]); $optlink = "$iml By ".$chnick." To ".$tonick; } $ds= date("H.i.s", $chat[2]); $text = parsepm($chat[3], $sid); $nos = substr_count($text,"2){ $chnick = getnick_uid($chat[0]); echo addchatmsg($chat[0],$text,1,"*Hey! $chnick, U Can Only Use 2 Smilies Per Msg!*"); }else{ $sres = substr($chat[3],0,3); if($sres == "/me") { $chco = strlen($chat[3]); $goto = $chco - 3; $rest = substr($chat[3],3,$goto); $tosay = parsepm($rest, $sid); echo addchatmsg($chat[0],$tosay,1,""); } else{ if($rinfo[0]==0){$tosay = getbbcode($chat[3], $sid, 0);} else{$tosay = parsepm($chat[3], $sid, 1);} if($rinfo[1]==1){$tosay = strrev($tosay);} echo "$optlink - "; echo $tosay."
"; } } $counter++; } } } echo "
"; echo ""; echo "Settings|"; $chatters=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline where rid='".$rid."'")); echo "Whos Inside $chatters[0]
"; echo "BuddyList|"; echo "Chat Rooms
"; include("admob.php"); echo "Home"; echo ""; } /////////////////////////////////////////////////////SAY else if ($action=="say") { echo ""; echo "Write Msg"; echo ""; echo ""; echo ""; echo "

"; addonline($uid,"Writing Chat Msg",""); echo "

"; echo "

Message:
"; echo "


"; $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'")); $rname = $rooms[1]; echo "4 Back To $rname
"; echo "6 Inbox
"; echo "7 BuddyList
"; echo "8 Chat
"; echo "0 \"\"/Home

"; echo ""; } //////////////////////////////////////////// /////////////////////////////////////////////////////SAY2 else if ($action=="say2") { echo ""; echo "Send Pm"; echo ""; echo ""; echo ""; echo "

"; $unick = getnick_uid($who); echo "Send Pm To $unick"; echo "

"; addonline($uid,"Writing Chat Msg",""); echo "
"; echo ""; echo "

Message:
"; echo "

"; echo "
"; if(ismod($uid)) { echo "* Clear Msgs
"; } echo "1 View $unick's Profile
"; echo "2 Expose $unick's Msgs
"; $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'")); $rname = $rooms[1]; echo "4 Back To $rname
"; echo "6 Inbox
"; echo "7 BuddyList
"; echo "8 Chat
"; echo "0 \"\"/Home

"; echo ""; } /////////////////////////////////////////////////////CHAT OPTIONS else if ($action=="options") { echo ""; echo "Chat Options"; echo ""; echo ""; echo ""; addonline($uid,"Chat Options",""); echo "1 Chat Mood
"; echo "2 Smilies List
"; echo "3 Who's Inside
"; $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'")); $rname = $rooms[1]; echo "4 Back To $rname
"; echo "6 Inbox
"; echo "7 BuddyList
"; echo "8 Chat
"; echo "0 \"\"/Home

"; echo ""; } //////////////////////////////////////////// //////////////////////////////inside////////// else if ($action=="inside") { addonline($uid,"Viewing Chat UserList",""); echo ""; echo "Chat UserList"; echo ""; echo ""; echo ""; echo "


"; $inside=mysql_query("SELECT DISTINCT * FROM ibwf_chonline WHERE rid='".$rid."' and uid IS NOT NULL"); while($ins=mysql_fetch_array($inside)) { $unick = getnick_uid($ins[1]); $userl = "$unick
"; echo "$userl"; } echo "
"; $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'")); $rname = $rooms[1]; echo "4 Back To $rname
"; echo "6 Inbox
"; echo "7 BuddyList
"; echo "8 Chat
"; echo "0 \"\"/Home

"; echo ""; } else if ($action=="expose") { addonline($uid,"Exposing ChatUser",""); echo ""; echo "Exposing ChatUser"; echo ""; echo ""; echo ""; echo "


"; mysql_query("UPDATE ibwf_chat SET exposed='1' WHERE chatter='".$who."' AND who='".$uid."'"); $unick = getnick_uid($who); echo "$unick messages to you have been exposed to staff"; echo "

"; $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'")); $rname = $rooms[1]; echo "4 Back To $rname
"; echo "6 Inbox
"; echo "7 BuddyList
"; echo "8 \"\"/RoomList
"; echo "0 \"\"/Home

"; echo ""; } else if(($action=="clear")&&(ismod($uid))) { addonline($uid,"Chat Tools",""); echo ""; echo "Clearing Users Msgs"; echo ""; echo ""; echo ""; echo "


"; $trgtnick=getnick_uid($who); $perm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'")); $trgtperm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$who."'")); if($trgtperm>$perm){ echo "\"x\"/
Error!!!
Permission Denied...

"; echo "
U Cannot Clear $trgtnick's Msgs
"; }else{ if(($who!="")||($who!=0)) { $res = mysql_query("DELETE FROM ibwf_chat WHERE chatter='".$who."'"); if($res) { echo "$trgtnick msgs have been cleared
"; }else{ echo "Failed clearing $trgtnick msgs
"; } }else{ echo "Username doesnot exist
"; } } echo "
"; $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'")); $rname = $rooms[1]; echo "4 Back To $rname
"; echo "6 Inbox
"; echo "7 BuddyList
"; echo "8 \"\"/RoomList
"; echo "0 \"\"/Home

"; echo ""; } ?>